//
//  UIView+YSView.m
//  Sodom
//
//  Created by 赵隆杰 on 2019/12/4.
//  Copyright © 2019 赵隆杰. All rights reserved.
//

#import "UIView+YSView.h"

@implementation UIView (YSView)

-(void)setBoderWidth:(CGFloat)boderWidth{
    if(boderWidth < 0) return;
    self.layer.borderWidth = boderWidth;
}
-(CGFloat)boderWidth{
    return self.layer.borderWidth;
}

-(void)setCornerRadius:(CGFloat)cornerRadius
{
    self.layer.cornerRadius = cornerRadius;
    self.layer.masksToBounds = cornerRadius > 0;
}
-(CGFloat)cornerRadius
{
    return self.layer.cornerRadius;
}

- (void)setBoderColor:(UIColor *)boderColor{
    self.layer.borderColor = boderColor.CGColor;
}

- (UIColor *)boderColor{
    return [UIColor colorWithCGColor:self.layer.borderColor];
}


@end
